
import axios from '@/utils/request'
/**
 * 获取部门列表
 */
export function getDepartment() {
  return axios({
    url: '/company/department'
  })
}
/**
 * @description 新增部门
 */
export function addDepartment(data) {
  return axios({
    url: '/company/department',
    method: 'POST',
    data
  })
}
/**
 * @description 获得员工简单列表/负责人
 */
export function getUser() {
  return axios({
    url: '/sys/user/simple',
    method: 'GET'

  })
}
/**
 * @description 根据id修改部门
 */
export function setMout(data, id) {
  return axios({
    url: `/company/department/${id}`,
    method: 'PUT',
    data
  })
}
/**
 * @description 根据id获得具体数据
 */
export function getIdUser(id) {
  return axios({
    url: `/company/department/${id}`,
    method: 'GET'

  })
}
/**
 * @description 删除部门
 */
export function delMout(id) {
  return axios({
    url: `/company/department/${id}`,
    method: 'DELETE'

  })
}
